<?php
namespace app\index\controller;
use think\Db;
class Notice extends Base{
    public function _initialize(){
        parent::_initialize();
    }
    // 公告
    public function index(){
        $notice=Db::name('notice')->select();
        $this->assign('notice',$notice);
        return view();
    }
    // 公告详情
    public function noticeDetail(){
        $id = input('id');
        $content=Db::name('notice')->where('id',$id)->find();
        $this->assign('content',$content);
        return view('notice_detail');
    }
}